package longcaisuyun.longcai.com.net;

import com.zcx.helper.http.AsyCallBack;
import com.zcx.helper.http.note.HttpInlet;
import com.zcx.helper.util.UtilMD5;

import org.json.JSONException;
import org.json.JSONObject;

/**
 * Created by Administrator on 2016/5/30.
 */
@HttpInlet(Net.EDITPASSWORD)
public class PostEditPassword extends WHAsyPost<PostEditPassword.Info>{
    public String driverid="";
    public String pwd="";
    public String newpwd="";
    public String action="";

    public PostEditPassword(String driverid, String pwd, String newpwd, String action,AsyCallBack<Info> asyCallBack) {
        super(asyCallBack);
        this.driverid = driverid;
        this.pwd = UtilMD5.MD5EncodeCount(pwd,"",2);
        this.newpwd = UtilMD5.MD5EncodeCount(newpwd, "", 2);
        this.action = action;
    }

    @Override
    protected Info parser(JSONObject object) {
        Info info=new Info();
        try {
            info.message=object.getString("message");
            return info;
        } catch (JSONException e) {
            e.printStackTrace();
        }
        return null;
    }

    public static class Info {
        public String message;
    }
}
